home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / techjock.arc / PULLTTT.PAS < prev    next >
Pascal/Delphi Source File  |  1988-11-18  |  22KB  |  593 lines

  1. {$S-,R-,V-,D-,T-}
  2. {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\}
  3. {         TechnoJocks Turbo Toolkit v4.00            Released: Feb 1, 1988    }
  4. {                                                                             }
  5. {         Module: PullTTT   --   Pull down menu system a la DBase III+        }
  6. {                                                                             }
  7. {                       Copyright R. D. Ainsbury (c) 1986                     }
  8. {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\}
  9.  
  10. Unit PULLTTT;
  11.  
  12. Interface
  13.  
  14. Uses CRT, FastTTT, DOS, WinTTT, KeyTTT;
  15.  
  16. type
  17.     MenuDesc = array [1..60] of string[30];
  18.     MenuDisplay = record
  19.                      TopX:byte;
  20.                      TopY:byte;
  21.                      Style:byte;
  22.                      ScreenNo:byte;
  23.                      FCol: byte;       {normal option foreground color}
  24.                      BCol: byte;       {normal option background color}
  25.                      CCol: byte;       {color of first Character}
  26.                      MBCol: byte;      {highlight bgnd col for main pick when sub-menu displayed}
  27.                      HFCol: byte;      {highlighted option foreground}
  28.                      HBCol: byte;      {highlighted option background}
  29.                      BorCol: byte;     {border foreground color}
  30.                      Gap   : byte;     {Gap between Picks}
  31.                      AllowEsc : boolean; {is Escape key operative}
  32.                      RemoveMenu: boolean;{clear screen on exit}
  33.                   end;
  34. Const
  35.     Max_MainPicks = 8;
  36.     Max_Subpicks  = 10;
  37.     MainInd = '\';           {symbol that indicates main menu description}
  38.  
  39. Var
  40.   PM : MenuDisplay;
  41.   PM_UserHook : pointer;
  42.  
  43.  
  44. Procedure Pull_Menu( Definition:MenuDesc; var PickM, PickS:byte);
  45.  
  46.  
  47. Implementation
  48.  
  49.    Procedure CallFromPM(var Ch: char; Main, Sub :byte);
  50.           Inline($FF/$1E/PM_UserHook);
  51.  
  52.    Procedure Default_Settings;
  53.    begin
  54.        PM_UserHook := nil;
  55.        PM.TopY := 1;
  56.        PM.TopX := 1;
  57.        PM.Style := 1;
  58.        PM.ScreenNo := 1;
  59.        PM.Gap := 2;
  60.        PM.AllowEsc := true;
  61.        PM.RemoveMenu := true;
  62.        If BaseOfScreen = $b000 then {monochrome}
  63.        begin
  64.            PM.FCol  := lightgray;
  65.            PM.BCol  := black;
  66.            PM.CCol  := white;
  67.            PM.MBCol  := lightgray;
  68.            PM.HFCol  := black;
  69.            PM.HBCol  := lightgray;
  70.            PM.BorCol := lightgray;
  71.        end
  72.        else                    {color}
  73.        begin
  74.            PM.FCol  := yellow;
  75.            PM.BCol  := blue;
  76.            PM.CCol  := lightcyan;
  77.            PM.MBCol  := red;
  78.            PM.HFCol  := yellow;
  79.            PM.HBCol  := red;
  80.            PM.BorCol := cyan;
  81.        end;
  82.   end; {Proc Default_Settings}
  83.  
  84.  
  85. Procedure Pull_Menu( Definition:MenuDesc; var PickM, PickS:byte);
  86. const
  87.     LeftChar = #016;         {arrow to highlight current pick}
  88.     RightChar = #017;        {arrow to highlight current pick}
  89.  
  90.     CursUp = #200  ;  CursDown = #208  ;  CursLeft = #203  ;   CursRight = #205;
  91.     HomeKey = #199 ;  Endkey   = #207  ;  Esc      = #027  ;   Enter     = #13;
  92.     F1      = #187 ;
  93.  
  94. type
  95.    Sub_details = record
  96.                     Text:  Array[0..Max_SubPicks] of string[30];
  97.                     Total: byte;
  98.                     Width: byte;
  99.                     LastPick: byte;
  100.                  end;
  101. var
  102.   Submenu  : array [1..Max_MainPicks] of Sub_Details;
  103.   Tot_main : byte;              {total number of main picks}
  104.   Main_Wid : byte;              {width of main menu box}
  105.   Finished,                     {has user selected menu option}
  106.   Down     : boolean;           {indicates if sub-menu displayed}
  107.   ChM,ChT      : char;          {keypressed character}
  108.   X1, Y1, X2, Y2 : byte;        {lower menu borders}
  109.   Cap,Count      : byte;        {used to check if letter pressed = first char}
  110.  
  111.   I                 : integer;
  112.   TLchar,           {border submenu upper left char}
  113.   TRchar,           {border submenu upper right char}
  114.   BLchar,           {border submenu bottom left char}
  115.   BRchar,           {border submenu bottom right char}
  116.   Joinchar,         {border joining character}
  117.   Joindownchar,     {border joining character}
  118.   JoinleftChar,     {border joining character}
  119.   VertChar,         {border vert character}
  120.   Horizchar:char;   {border horiz char}
  121.  
  122.  
  123.     Procedure PullError(No : byte);
  124.     var M : string;
  125.     begin
  126.         Case No of
  127.         1 : M := 'Menu definiton must start with a Main ("\") description';
  128.         2 : M := 'Main menu definition must be at least 1 character';
  129.         3 : M := 'Too many main menu picks.';
  130.         4 : M := 'Too many sub-menu picks.';
  131.         5 : M := 'No end of menu indicator found';
  132.         6 : M := 'Must be at least two sub-menus';
  133.         7 : M := 'Main menu will not fit in 80 characters';
  134.         end; {case}
  135.         Writeln;
  136.         Writeln(M);
  137.         Halt;
  138.     end; {Abort}
  139.  
  140.     Procedure Set_Style;
  141.     {Sets variables for the box characters based on defined style}
  142.     begin
  143.         Case PM.Style of
  144.         1  :  begin
  145.                   TLchar := #218;
  146.                   TRchar := #191;
  147.                   BLchar := #192;
  148.                   BRchar := #217;
  149.                   Joinchar := #194;
  150.                   Joindownchar := #193;
  151.                   JoinleftChar := #180;
  152.                   VertChar := #179;
  153.                   Horizchar := #196;
  154.               end;
  155.         2  :  begin
  156.                   TLchar := #201;
  157.                   TRchar := #187;
  158.                   BLchar := #200;
  159.                   BRchar := #188;
  160.                   Joinchar := #203;
  161.                   Joindownchar := #202;
  162.                   JoinleftChar := #185;
  163.                   VertChar := #186;
  164.                   Horizchar := #205;
  165.               end;
  166.         else
  167.              begin
  168.                   TLchar := ' ';
  169.                   TRchar := ' ';
  170.                   BLchar := ' ';
  171.                   BRchar := ' ';
  172.                   Joinchar := ' ';
  173.                   Joindownchar := ' ';
  174.                   JoinleftChar := ' ';
  175.                   VertChar := ' ';
  176.                   Horizchar := ' ';
  177.               end;
  178.         end; {Case}
  179.     end;  {Proc Set_Style}
  180.  
  181.     Procedure Load_Menu_Parameters;
  182.     { converts the MenuDesc array into the Sub_menu array, and
  183.       determines Tot_main
  184.     }
  185.     var
  186.       I, Maj, Min, Widest : integer;
  187.       Instr : string[30];
  188.     begin
  189.         FillChar(Submenu,sizeof(Submenu),#0);
  190.         Tot_main := 0;
  191.         If Definition[1][1] <> '\' then PullError(1);
  192.         Maj := 0;
  193.         Widest := 0;
  194.         For I := 1 to 60 do
  195.         begin
  196.             Instr := Definition[I];
  197.             If Instr[1] = MainInd then
  198.             begin
  199.                 If Maj <> 0 then           {update values for last sub menu}
  200.                 begin
  201.                     SubMenu[Maj].Total := Min;
  202.                     SubMenu[Maj].Width := widest;
  203.                 end;
  204.                 If length(Instr) < 2 then PullError(2);
  205.                 If Instr = Mainind + mainind then   {must have loaded all data}
  206.                 begin                               {note number of main menu }
  207.                     Tot_main := Maj;                   {picks and exit}
  208.                     exit;
  209.                 end;
  210.                 Maj := succ(Maj);
  211.                 If Maj > Max_mainpicks then PullError(3);
  212.                 delete(Instr,1,1);
  213.                 SubMenu[Maj].text[0] := Instr;
  214.                 Min := 0;                      {reset values for next sub heading}
  215.                 Widest := 0;
  216.             end
  217.             else         {not a main menu heading}
  218.             begin
  219.                 Min := succ(Min);
  220.                 If Min > Max_SubPicks then PullError(4);
  221.                 SubMenu[Maj].text[Min] := Instr;
  222.                 If length(Instr) > widest then
  223.                    widest := length(Instr);
  224.             end;   {if main heading}
  225.         end; {for 1 to 60}
  226.         If Tot_main = 0 then PullError(5);
  227.         If Tot_main < 2 then PullError(6);
  228.    end; {sub-proc Load_Menu_Parameters}
  229.  
  230.    Function First_Capital(InStr:string; Var StrPos:byte):char;
  231.    {returns the first capital letter in a string and Character position}
  232.    begin
  233.        StrPos := 1;
  234.        While (StrPos <= length(InStr))  and ((InStr[StrPos] in [#65..#90]) = false) do
  235.               StrPos := Succ(StrPos);
  236.        If StrPos > length(InStr) then
  237.        begin
  238.            StrPos := 0;
  239.            First_Capital := ' ';
  240.        end
  241.        else
  242.           First_Capital := InStr[StrPos];
  243.    end;   {First_Capital}
  244.  
  245.    Procedure Display_Main_Picks(No : byte; Col : byte);
  246.    { displays main heading for menu pick 'No', if Col = 1 then
  247.      PM.HFCol and PM.MBCol cols are used without arrows, else PM.FCol and PM.BCol
  248.      colors are used}
  249.    var
  250.      ChT : Char;
  251.      X, I, B : byte;
  252.    begin
  253.        X := 1;
  254.        If No = 1 then
  255.           X := X + PM.TopX + PM.Gap
  256.        else
  257.        begin
  258.            For I := 1 to No - 1 do
  259.                X := X + length(Submenu[I].Text[0]) + PM.Gap;
  260.            X := X + PM.TopX  + PM.Gap ;
  261.        end;
  262.        If Col > 0 then
  263.           Fastwrite(X,PM.TopY+ord(PM.Style>0),attr(PM.HFCol,PM.MBCol),
  264.                     Submenu[No].Text[0])
  265.        else
  266.        begin
  267.            Fastwrite(X,PM.TopY+ord(PM.Style>0),attr(PM.FCol,PM.BCol),
  268.                      +Submenu[No].Text[0]);
  269.            ChT := First_Capital(Submenu[No].Text[0],B);
  270.            If B <> 0 then
  271.               FastWrite(pred(X)+B,PM.TopY+ord(PM.Style>0),
  272.                         attr(PM.CCol,PM.BCol),ChT);
  273.        end;
  274.        GotoXY(X,PM.TopY+Ord(PM.Style>0));
  275.    end; {Display Main Header}
  276.  
  277.    Procedure Display_Main_Menu;
  278.    {draws boxes, main menu picks and draws border}
  279.    var I : byte;
  280.    begin
  281.        {draw the box}
  282.        Main_Wid := succ(PM.Gap) ;           {determine the width of the main menu}
  283.        For I := 1 to Tot_Main do
  284.            Main_Wid := Main_Wid + PM.Gap + length(Submenu[I].text[0]);
  285.        If Main_Wid + PM.TopX - 1 > 80 then PullError(7);
  286.        If PM.Style = 0 then
  287.           ClearText(PM.TopX,PM.TopY,PM.TopX + Main_Wid,PM.TopY,PM.BorCol,PM.BCol)
  288.        else
  289.           Fbox(PM.TopX,PM.TopY,PM.TopX + Main_Wid,PM.TopY + 2,PM.BorCol,PM.BCol,PM.Style);
  290.        For I := 1 to ToT_Main do
  291.            Display_Main_Picks(I,0);
  292.        Display_Main_Picks(PickM,1);
  293.    end;  {Display_Main_Menu}
  294.  
  295.    Procedure Remove_Sub_Menu;
  296.    var a : integer;
  297.    begin
  298.        Fastwrite(X1,PM.TopY+2,attr(PM.BorCol,PM.BCol),horizchar);
  299.        Fastwrite(X2,PM.TopY+2,attr(PM.BorCol,PM.BCol),horizchar);
  300.        PartRestoreScreen(PM.ScreenNo, PM.TopX, succ(PM.TopY)+2*ord(PM.Style>0), 80, 25,
  301.                                    PM.TopX, succ(PM.TopY)+2*ord(PM.Style>0));
  302.        If (PM.Style > 0 ) and (X2 >= PM.TopX + Main_wid) then
  303.        begin
  304.            A := PM.TopX +Main_Wid + 1;
  305.            PartRestoreScreen(PM.ScreenNo, A, PM.TopY + 2, 80, PM.TopY + 2, A, PM.TopY + 2);
  306.            Fastwrite(A - 1, PM.TopY+2, attr(PM.BorCol,PM.BCol),BRchar);
  307.        end;
  308.        SubMenu[PickM].LastPick := PickS;
  309.    end;
  310.  
  311.    Procedure Display_Sub_Picks(No : byte; Col : byte);
  312.    { displays sub  menu pick 'No', if Col = 1 then
  313.      PM.HFCol and PM.HBCol cols are used and arrows, else PM.FCol and PM.BCol
  314.      colors are used}
  315.    var
  316.      ChT : Char;
  317.      B : Byte;
  318.    begin
  319.        If Col = 1 then
  320.           Fastwrite(X1 + 1, succ(PM.TopY)+ord(PM.Style>0) + No ,
  321.                     attr(PM.HFCol,PM.HBCol),
  322.                     LeftChar + Submenu[PickM].Text[No] + Rightchar)
  323.        else
  324.        begin
  325.           Fastwrite(X1 + 1, succ(PM.TopY)+Ord(PM.Style>0) + No ,
  326.                     attr(PM.FCol,PM.BCol),
  327.                     ' '+Submenu[PickM].Text[No]+' ');
  328.           ChT := First_Capital(SubMenu[PickM].Text[No],B);
  329.           If B <> 0 then
  330.              FastWrite(X1+1+B,succ(PM.TopY)+Ord(PM.Style>0) + No ,
  331.                        attr(PM.CCol,PM.BCol),ChT);
  332.        end;
  333.        GotoXY(X1+1,succ(PM.TopY)+ord(Pm.Style>0)+ No);
  334.    end;
  335.  
  336.  
  337.    Procedure Display_Sub_Menu(No :byte);
  338.    var
  339.      BotLine : string;
  340.      I : byte;
  341.    begin
  342.        Down := true;
  343.        If (Submenu[pickM].Total = 0) then exit;
  344.        X1 := pred(PM.TopX);                    {determine box coords of sub menu}
  345.        If No <> 1 then
  346.        begin
  347.            For I := 1 to pred(No) do
  348.                X1 := X1 + PM.Gap + length(Submenu[I].text[0]);
  349.            X1 := pred(X1) + PM.Gap ;
  350.        end
  351.        else
  352.           X1 := X1 + 2;
  353.        X2 := X1 + Submenu[No].width + 3;
  354.        If X2 > 80 then
  355.        begin
  356.            X1 := 80 - (X2 - X1) ;
  357.            X2 := 80;
  358.        end;
  359.        Y1 := succ(PM.TopY) + ord(PM.Style>0);
  360.        Y2 := Y1 + 1 + Submenu[No].total;
  361.        Fbox(X1,Y1,X2,Y2,PM.BorCol,PM.BCol,PM.Style);
  362.        Fastwrite(X1,succ(PM.TopY)+ord(PM.Style>0),attr(PM.BorCol,PM.BCol),Joinchar);
  363.        If X2 < PM.TopX + Main_wid then
  364.           Fastwrite(X2,succ(PM.TopY)+ord(PM.Style>0),attr(PM.BorCol,PM.BCol),Joinchar)
  365.        else
  366.        If X2 = PM.TopX + Main_wid then
  367.           Fastwrite(X2,succ(PM.TopY)+ord(PM.Style>0),attr(PM.BorCol,PM.BCol),Joinleftchar)
  368.        else
  369.        begin
  370.            Fastwrite(X2,PM.TopY+2,attr(PM.BorCol,PM.BCol),TRchar);
  371.            Fastwrite(PM.TopX+Main_wid,succ(PM.TopY)+ord(PM.Style>0),attr(PM.BorCol,PM.BCol),Joindownchar);
  372.        end;
  373.        For I := 1 to Submenu[PickM].total do
  374.            Display_Sub_Picks(I,2);
  375.        PickS := SubMenu[PickM].LastPick;
  376.        If not (PickS in [1..Submenu[PickM].Total]) then
  377.           PickS := 1;
  378.        Display_Sub_Picks(PickS,1);
  379.    end;  {proc Display_Sub_Menu}
  380.  
  381. begin     {Main Procedure Display_menu}
  382.  
  383.     Set_Style;
  384.     Load_Menu_Parameters;
  385.     SaveScreen(PM.ScreenNo);
  386.     Finished := false;
  387.     Display_Main_Menu;
  388.     For I := 1 to Tot_main do
  389.         Submenu[I].lastPick := 1;
  390.     SubMenu[PickM].LastPick := PickS;
  391.  
  392.     If PickS <> 0 then
  393.     begin
  394.         Display_Sub_Menu(PickM);
  395.         Down := true;
  396.     end
  397.     else
  398.         Down := false;
  399.     Repeat
  400.           ChM := GetKey;
  401.           If PM_UserHook <> nil then
  402.              If Down then
  403.                 CallFromPM(ChM,PickM,PickS)
  404.              else
  405.                 CallFromPM(ChM,PickM,0);
  406.   Case upcase(ChM) of
  407.   'A'..'Z'   : If down then    {check if letter is first letter of menu option}
  408.                begin
  409.                    Count := 0;
  410.                    Repeat
  411.                         Count := succ(count);
  412.                         ChT := First_Capital(Submenu[PickM].Text[count],Cap);
  413.                         If ChT  = upcase(ChM) then
  414.                         begin
  415.                             Finished := true;
  416.                             Display_Sub_Picks(PickS,0);
  417.                             PickS := Count;
  418.                             Display_Sub_Picks(PickS,1);
  419.                         end;
  420.                    Until (Finished) or (count = submenu[PickM].Total);
  421.                end
  422.                else      {down false}
  423.                begin
  424.                    Count := 0;
  425.                    Repeat
  426.                         Count := succ(count);
  427.                         ChT := First_Capital(Submenu[Count].Text[0],Cap);
  428.                         If ChT = upcase(ChM) then
  429.                         begin
  430.                             Display_Main_Picks(PickM,0);
  431.                             PickM := Count;
  432.                             Down := true;
  433.                             Display_Main_Picks(PickM,2);
  434.                             If not (PickS in [1..Submenu[PickM].Total]) then
  435.                                PickS := 1;
  436.                             Display_Sub_Menu(PickM);
  437.                         end;
  438.                    Until (Down) or (count = Tot_Main);
  439.                end;
  440.   #133,          {Mouse Enter}
  441.   Enter      : If Down or (Submenu[PickM].Total = 0) then
  442.                begin
  443.                   Finished := true;
  444.                   If Submenu[PickM].Total = 0 then PickS := 0;
  445.                end
  446.                else
  447.                begin
  448.                    Down := true;
  449.                    Display_Main_Picks(PickM,2);
  450.                    Display_Sub_Menu(PickM);
  451.                end;
  452.   #132,        {Mouse Esc}
  453.   Esc       :  If Down then
  454.                begin
  455.                    Down := false;
  456.                    Remove_sub_menu;
  457.                    Display_Main_menu;
  458.                end
  459.                else
  460.                    If PM.AllowEsc then
  461.                    begin
  462.                        Finished := true;
  463.                        PickM := 0;
  464.                    end;
  465.   #131      :  If PickM < ToT_main then
  466.                begin
  467.                    Display_main_picks(PickM,0);  {clear highlight}
  468.                    If Down then
  469.                       Remove_Sub_Menu;
  470.                    PickM := succ(PickM);
  471.                    Display_Main_Picks(PickM,1);
  472.                    If down then
  473.                       Display_Sub_Menu(PickM);
  474.                end;
  475.   CursRight :  begin
  476.                    Display_main_picks(PickM,0);  {clear highlight}
  477.                    If Down then
  478.                       Remove_Sub_Menu;
  479.                    If PickM < ToT_main then
  480.                       PickM := PickM + 1
  481.                    else
  482.                       PickM := 1;
  483.                    Display_Main_Picks(PickM,1);
  484.                    If down then
  485.                        Display_Sub_Menu(PickM);
  486.                end;
  487.   #130      :  If PickM > 1 then    {MouseLeft}
  488.                begin
  489.                    Display_main_picks(PickM,0);  {clear highlight}
  490.                    If Down then
  491.                       Remove_Sub_Menu;
  492.                    PickM := pred(PickM);
  493.                    Display_Main_Picks(PickM,1);
  494.                    If down then
  495.                        Display_Sub_Menu(PickM);
  496.                end;
  497.  
  498.   CursLeft  :  begin
  499.                    Display_main_picks(PickM,0);  {clear highlight}
  500.                    If Down then
  501.                       Remove_Sub_Menu;
  502.                    If PickM > 1 then
  503.                       PickM := pred(PickM)
  504.                    else
  505.                       PickM := Tot_Main;
  506.                    Display_Main_Picks(PickM,1);
  507.                    If down then
  508.                        Display_Sub_Menu(PickM);
  509.                end;
  510.   #129       : If (Submenu[PickM].Total <> 0) then
  511.                begin
  512.                    If Not Down then    {Mouse Down}
  513.                    begin
  514.                        Down := true;
  515.                        Display_Main_Picks(PickM,2);
  516.                        Display_Sub_Menu(PickM);
  517.                    end
  518.                    else
  519.                       If PickS < Submenu[PickM].Total then
  520.                       begin
  521.                           Display_Sub_Picks(PickS,0);
  522.                           PickS := succ(PickS);
  523.                           Display_Sub_Picks(PickS,1);
  524.                       end;
  525.                end;
  526.   CursDown   : If (Submenu[PickM].Total <> 0) then
  527.                begin
  528.                    If Not Down then
  529.                    begin
  530.                        Down := true;
  531.                        Display_Main_Picks(PickM,2);
  532.                        Display_Sub_Menu(PickM);
  533.                    end
  534.                    else
  535.                    begin
  536.                        Display_Sub_Picks(PickS,0);
  537.                        If PickS < Submenu[PickM].Total then
  538.                           PickS := succ(PickS)
  539.                        else
  540.                           PickS := 1;
  541.                        Display_Sub_Picks(PickS,1);
  542.                    end;
  543.                end;
  544.   #128       : If down and (Picks > 1) then
  545.                begin
  546.                    Display_Sub_Picks(PickS,0);
  547.                    PickS := pred(PickS);
  548.                    Display_Sub_Picks(PickS,1);
  549.                end;
  550.   CursUp     : If down then
  551.                begin
  552.                    Display_Sub_Picks(PickS,0);
  553.                    If PickS <> 1  then
  554.                       PickS := pred(PickS)
  555.                    else
  556.                       PickS := Submenu[PickM].Total;
  557.                    Display_Sub_Picks(PickS,1);
  558.                end;
  559.   EndKey    :  If Down then
  560.                begin
  561.                    Display_Sub_Picks(PickS,0);
  562.                    PickS := Submenu[PickM].Total;
  563.                    Display_Sub_Picks(PickS,1);
  564.                end
  565.                else
  566.                begin
  567.                    Display_main_picks(PickM,0);  {clear highlight}
  568.                    PickM := ToT_Main;
  569.                    Display_main_picks(PickM,1);
  570.                end;
  571.   HomeKey   :  If Down then
  572.                begin
  573.                    Display_Sub_Picks(PickS,0);
  574.                    PickS := 1;
  575.                    Display_Sub_Picks(PickS,1);
  576.                end
  577.                else
  578.                begin
  579.                    Display_main_picks(PickM,0);  {clear highlight}
  580.                    PickM := 1;
  581.                    Display_main_picks(PickM,1);
  582.                end;
  583.   end; {endcase}
  584.  Until Finished;
  585.  If PM.RemoveMenu Then
  586.     RestoreScreen(PM.ScreenNo);
  587.  DisposeScreen(PM.ScreenNo);
  588.  end;  {end of main procedure Display_Menu}
  589.  
  590. begin
  591.   Horiz_Sensitivity := 4;   {cursors left and right before mouse returns}
  592.   Default_Settings;
  593. end.